package com.gyp.dto.rpc;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class TokenRequestDTO {

    private TokenAuthRequest auth;


    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class TokenAuthRequest {

        private TokenIdentityRequest identity;

        private TokenScopeRequest scope;

    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class TokenScopeRequest {
        private TokenProjectRequest project;
    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class TokenProjectRequest {

        private String name;

    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class TokenIdentityRequest {

        private List<String> methods;

        private TokenPasswordRequest password;

    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class TokenPasswordRequest {

        //IAM用户
        private TokenIAMUserRequest user;

    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class TokenIAMUserRequest {

        //IAM用户名
        private String name;

        //IAM用户密码
        private String password;

        //IAM用户
        private TokenDomainRequest domain;

    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class TokenDomainRequest {

        //IAM用户名所属账号
        private String name;


    }

}

